package com.mxf.code.response;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.mxf.code.service.ChildrenTree;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author Moshimo
 */
@Data
@NoArgsConstructor
@ApiModel("空间位置树型结构-出参")
public class LocationListWithTreeResponse implements ChildrenTree<LocationListWithTreeResponse>, Serializable {

    @ApiModelProperty("空间位置id")
    private Long value;

    @ApiModelProperty("空间位置名称")
    private String label;

    @JsonIgnore
    private Long parentId;

    @JsonInclude(JsonInclude.Include.NON_EMPTY)
    @ApiModelProperty("子结构")
    private List<LocationListWithTreeResponse> children = new ArrayList<>();
}